@extends('admin.layout.layout', ['row' => @$page])

@section('contain')


    <div class="portlet">
        <div class="portlet-title">
            <div class="caption">
                <a href="/admin/" class="caption-home"><i class="fa fa-home"></i> </a>
                <a href="/admin/">{{ ts('Dashboard') }}</a>
                <i class="fa fa-angle-right"></i>
                @if(!empty($page['breadcrumb']))
                    @foreach($page['breadcrumb'] as $b)
                        <a href="{{ @$b['url'] }}">{{ @$b['text'] }}</a>
                        <i class="fa fa-angle-right"></i>
                    @endforeach
                @endif
                <span class="active">{{ @$page['title'] }}</span>
            </div>
            <div class="actions">
                <div class="item">
                    <a href="/{{ request()->path() }}/create" class="btn btn-sm btn-primary">{{ ts('addnew') }}</a>
                </div>
            </div>
        </div>

        <div>
            <h3 class="section_sub_title">{{ ts('baseinformation') }}</h3>
            <table class="table table-s1">
                <tbody>
                <tr>
                    <td style="width: 200px;">{{ ts('distributorid') }}</td>
                    <td>{{ $data->id }}</td>
                </tr>
                <tr>
                    <td style="width: 200px;">{{ ts('distributorid') }}</td>
                    <td>{{ $data->unique_id }}</td>
                </tr>
                <tr>
                    <td>{{ ts('companyname') }}</td>
                    <td>{{ $data->company_name }}</td>
                </tr>
                <tr>
                    <td>{{ ts('PHONENUMBER') }}</td>
                    <td>{{ $data->extension . ' ' . $data->phone_number }}</td>
                </tr>
                <tr>
                    <td>{{ ts('EMAIL') }}</td>
                    <td>{{ $data->email_address }}</td>
                </tr>
                <tr>
                    <td>{{ ts('status') }}</td>
                    <td>
                        {{ $data->status == 1 ? ts('active') : ts('DEACTIVE') }}
                        <span class="btn btn-danger btn-sm ml-3" onclick="editDistributorStatus({{ $data->id }}, {{ $data->status }})">{{ $data->status == 1 ? ts('active') : ts('DEACTIVE') }}</span>
                    </td>
                </tr>
                </tbody>
            </table>
            <h3 class="section_sub_title">{{ ts('regionInformation') }}</h3>
            <table class="table table-s1">
                <tbody>
                <tr>
                    <td style="width: 200px;">{{ ts('region') }}</td>
                    <td>{{ __('region_master.'.$data->region_id) }}</td>
                </tr>
                <tr>
                    <td>{{ ts('province') }}</td>
                    <td>{{ __('province_master.'.$data->province_id) }}</td>
                </tr>
                <tr>
                    <td>{{ ts('city') }}</td>
                    <td>{{ __('cities.'.$data->city) }}</td>
                </tr>
                <tr>
                    <td>{{ ts('ADDRESSS') }}</td>
                    <td>{{ $data->address }}</td>
                </tr>
                </tbody>
            </table>
            <h3 class="section_sub_title">{{ ts('contactinformation') }}</h3>
            <table class="table table-s1">
                <tbody>
                <tr>
                    <td style="width: 200px;">{{ ts('contactperson') }}</td>
                    <td>{{ $data->first_name }}</td>
                </tr>
                <tr>
                    <td>{{ ts('contactinformation') }}</td>
                    <td>{{ $data->cell_phone }}</td>
                </tr>
                <tr>
                    <td>{{ ts('WECHATID') }}</td>
                    <td>{{ $data->wechat_id }}</td>
                </tr>
                </tbody>
            </table>
            <h3 class="section_sub_title">{{ ts('note') }}</h3>
            <div style="padding: 10px;border: 1px solid #eee;-webkit-border-radius: 7px;-moz-border-radius: 7px;border-radius: 7px;">
                {{ $data->note }}
            </div>
            <div class="mt-4">
                <a href="/{{ request()->path() }}/edit" class="btn btn-info">{{ ts('edit') }}</a>
            </div>
        </div>
    </div>


@endsection